package portal.action.views;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.alibaba.druid.util.StringUtils;

import utils.Log4jInit;

@Controller
public class MonitorForwardAction {

    /**************************************调度菜单相关View End******************************************/
    @RequestMapping(value="/views/host/control",method=RequestMethod.GET)
    public String hostControl(){
        return "monitor/hostControl";
    }
    @RequestMapping(value="/views/monhost/list",method=RequestMethod.GET)
    public String monHostList(){
        return "monitor/hostList";
    }
    @RequestMapping(value="/views/monhost/add",method=RequestMethod.GET)
    public String monHostAdd(){
        return "monitor/hostAdd";
    }
    @RequestMapping(value="/views/monhost/update",method=RequestMethod.GET)
    public String monHostUpdate(){
        return "monitor/hostUpdate";
    }
    @RequestMapping(value="/views/monhost/batchOrder",method=RequestMethod.GET)
    public String monHostBatchOrder(){
        return "monitor/hostBatchOrder";
    }
    @RequestMapping(value="/views/monhost/fileTransfer",method=RequestMethod.GET)
    public String monHostFileTransfer(String hostIP ,HttpServletRequest req){
    	req.setAttribute("hostIP", hostIP);
        return "monitor/hostFileTransfer";
    }
    @RequestMapping(value="/views/monhost/fileUpload",method=RequestMethod.GET)
    public String fileUpload(){
        return "monitor/fileUpload";
    }
    @RequestMapping(value="/views/monhost/softwareDeployment",method=RequestMethod.GET)
    public String monHostSoftwareDeployment(String hostIP ,HttpServletRequest req){
    	req.setAttribute("hostIP", hostIP);
        return "monitor/hostSoftwareDeployment";
    }
    @RequestMapping(value="/views/monhost/viewInstallers",method=RequestMethod.GET)
    public String monHostViewInstallers(String hostIP ,HttpServletRequest req){
    	req.setAttribute("hostIP", hostIP);
    	Log4jInit.logger.info("hostIP::"+hostIP);
        return "monitor/hostViewInstallers";
    }
    @RequestMapping(value="/views/monhost/viewProcess",method=RequestMethod.GET)
    public String monHostViewProcess(String hostIP ,HttpServletRequest req){
    	//Log4jInit.logger.info("hostIP::"+hostIP);
    	req.setAttribute("hostIP", hostIP);
        return "monitor/hostViewProcess";
    }

    @RequestMapping(value="/views/monhost/viewUsb",method=RequestMethod.GET)
    public String checkUsb(String hostIP ,HttpServletRequest req){
    	//Log4jInit.logger.info("hostIP::"+hostIP);
    	req.setAttribute("hostIP", hostIP);
        return "monitor/hostViewUsb";
    }
    
    @RequestMapping(value="/views/monhost/patternChose",method=RequestMethod.GET)
    public String monitorPatternChose(String IPS,HttpServletRequest req){
    	req.setAttribute("IPS", IPS);
        return "monitor/monitorPatternChose";
    }
    
    @RequestMapping(value="/views/monhost/group",method=RequestMethod.GET)
    public String monHostGroupList(){
        return "monitor/hostGroupList";
    }
    @RequestMapping(value="/views/monhost/group/add",method=RequestMethod.GET)
    public String monHostGroupRegister(){
        return "monitor/hostGroupAdd";
    }
    @RequestMapping(value="/views/monhost/group/update",method=RequestMethod.GET)
    public String monHostGroupUpdate(){
        return "monitor/hostGroupUpdate";
    }
    @RequestMapping(value="/views/software/list",method=RequestMethod.GET)
    public String softwareList(){
        return "monitor/softwareList";
    }
    @RequestMapping(value="/views/software/add",method=RequestMethod.GET)
    public String softwareRegister(){
        return "monitor/softwareAdd";
    }
    @RequestMapping(value="/views/software/update",method=RequestMethod.GET)
    public String softwareUpdate(){
        return "monitor/softwareUpdate";
    }
    @RequestMapping(value="/views/pattern/list",method=RequestMethod.GET)
    public String patternList(){
        return "monitor/monitorPatternList";
    }
    @RequestMapping(value="/views/pattern/add",method=RequestMethod.GET)
    public String patternRegister(){
        return "monitor/monitorPatternAdd";
    }
    @RequestMapping(value="/views/pattern/update",method=RequestMethod.GET)
    public String patternUpdate(){
        return "monitor/monitorPatternUpdate";
    }
    
    @RequestMapping(value="/views/blacklist/list",method=RequestMethod.GET)
    public String blacklistList(){
        return "monitor/blacklistList";
    }
    @RequestMapping(value="/views/blacklist/add",method=RequestMethod.GET)
    public String blacklistRegister(String id,HttpServletRequest req){
    	if(!StringUtils.isEmpty(id)){
    		req.setAttribute("id", id);
    	}
        return "monitor/blacklistAdd";
    }

}
